<?php
/**
 * Created by PhpStorm.
 * User: DongYao
 * Date: 2018/1/26
 * Time: 下午5:29
 */

namespace App\Support\MobileSms;


interface SmsInterface
{
    /**
     * 前台用户
     */
    const USER_PLATFORM_FRONT = 0;

    /**
     * 后台用户
     */
    const USER_PLATFORM_BACKEND = 1;

    /**
     * 生成手机短信息
     * @param string $mobile
     * @param string $content
     * @param string $content_type
     * @return mixed
     */
    public function makeSms(string $mobile, string $content, string $content_type);

    /**
     * 生成手机验证码
     * @param string $mobile
     * @param string $code
     * @param string $content
     * @param string $content_type
     * @param int $user_platform
     * @return mixed
     */
    public function makeAuthCode(string $mobile, string $code, string $content, string $content_type, int $user_platform);

    /**
     * 验证手机验证码
     * @param string $mobile
     * @param string $code
     * @param int $ttl
     * @param int $user_platform
     * @return mixed
     */
    public function verifyAuthCode(string $mobile, string $code, int $ttl = 600, int $user_platform);
}